import httpRequest from '../../utils/request'
import modules from '../modules'
const defaultRoute = 'ProductPlanning_Material'
const controllerName = 'Material'

export interface MaterialParam {
  MaterialsName: string | null
  PageIndex: number
  PageSize: number
  totalCount: number
 
}


// 获取原料列表
export function ApiGetProductPlanning_MaterialPageListAsync(param: MaterialParam) {
  return httpRequest({
    url: `${modules.ProductPlanningModuleUrl}/${controllerName}/Get${defaultRoute}PageList`,
    method: "Post",
    data: param,
  });
}

// 批量删除原料
export function ApiDeletionProductPlanning_MaterialAsync(param: string[]) {
  return httpRequest({
    url: `${modules.ProductPlanningModuleUrl}/${controllerName}/Deletion${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 添加原料
export function ApiCreateProductPlanning_MaterialAsync(param: object) {
  return httpRequest({
    url: `${modules.ProductPlanningModuleUrl}/${controllerName}/Create${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 更新原料
export function ApiUpdateProductPlanning_MaterialAsync(param: object) {
  return httpRequest({
    url: `${modules.ProductPlanningModuleUrl}/${controllerName}/Update${defaultRoute}`,
    method: "Post",
    data: param,
  });
}